package com.atguigu.tingshu.album.client;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.BaseCategory1;
import com.atguigu.tingshu.model.album.BaseCategory3;
import com.atguigu.tingshu.model.album.BaseCategoryView;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @Author GQS @Date 2024/11/5/21:12 @Description
 * 分类相关的feign接口
 */
@FeignClient(name = "service-album", path = "/client/album/category", contextId = "baseCategoryFeignClient")
public interface BaseCategoryFeignClient {

  @GetMapping("/getBaseCategory3List/{category1Id}")
  List<BaseCategory3> getBaseCategory3List(@PathVariable("category1Id") Long category1Id);
  /**
   * 根据三级分类查询一级二级三级分类的视图
   * @param category3Id
   * @return
   */
  @GetMapping(value = "/getBaseCategoryView/{category3Id}")
  BaseCategoryView getBaseCategoryView(@PathVariable(value = "category3Id") Long category3Id);

  /**
   * 查询所有的一级分类
   * @return
   */
  @GetMapping(value = "/getBaseCategory1")
  public List<BaseCategory1> getBaseCategory1();
}
